package com.lening.communitylog.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 操作日志表
 * </p>
 *
 * @author 秦旭
 * @since 2024-06-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
//@TableName("t_log")
@ApiModel(value="Log对象", description="操作日志表")
public class Log implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "登录用户")
    private String username;

    @ApiModelProperty(value = "操作系统")
    private String platform;

    @ApiModelProperty(value = "地址")
    private String uri;

    @ApiModelProperty(value = "请求方法")
    private String requestMethod;

    @ApiModelProperty(value = "协议")
    private String schema;

    @ApiModelProperty(value = "请求体")
    private String requestBody;

    @ApiModelProperty(value = "响应体")
    private String responseData;

    @ApiModelProperty(value = "ip")
    private String ip;

    @ApiModelProperty(value = "请求时间")
    private LocalDateTime requestTime;

    @ApiModelProperty(value = "响应时间")
    private LocalDateTime responseTime;
    @ApiModelProperty(value = "执行时间")
    private LocalDateTime executeTime;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

}
